PHYZZX has a macro
eq which can take care of this chore for
you automatically.
All you have to do is type
$$ x + y = { 2
over (x - y) }
eqno
eq $$
to get
and you will have automatically generated an equation number.
The question is, What sort of equation
number will you generate ?.
Once again, this is a question of style.
If you are in the Phys.Rev. format, or in the default Nuclear Physics
format then the equation label is of the form
chapterlabel.equation number.
Equations are numbered sequentially within each chapter, but
when you change chapters the chapter number is increased by
1 and the equation number is reset to 1.
If you have chosen the format with unnumbered chapters and sections,
then
eq will automatically generate sequential equation numbers.
As far as we are concerned this is the most satisfactory way of
numbering things.
For short papers, i.e. those with only one chapter, choose the unnumbered
chapter format and all of your equations will be numbered sequentially;
for longer papers, i.e. those which call for dividing them into
chapters, numbering the equations by their chapter and number within
the chapter makes it easier to refer to them.
Sometimes, however, either out of perversity or because a paper
has many chapters but very few equations, an author wishes to
choose the format with numbered chapters but sequential equation numbers.
This will happen if, before entering the first equation in your paper
you type the command
sequentialequations
Hence, in the default mode, typing
$$ 7x + 11xˆ 2 = 50
eqno
eq $$
$$ 3x + xˆ 3 = 85
eqno
eq $$
$$ 4x + 8xˆ 7 = 12
eqno
eq $$
$$ 7x + 4xˆ 2 = 0
eqno
eq $$
$$ x + 21xˆ 5 = -5
eqno
eq $$
yields
=0
7
x + 11
x2 = 50
3
x +
x3 = 85
4
x + 8
x7 = 12
7
x + 4
x2 = 0
x + 21
x5 = - 5
If, however, you first type
sequentialequations;
then typing
$$ 7x + 11xˆ 2 = 50
eqno
eq $$
$$ 3x + xˆ 3 = 85
eqno
eq $$
$$ 4x + 8xˆ 7 = 12
eqno
eq $$
$$ 7x + 4xˆ 2 = 0
eqno
eq $$
$$ x + 21xˆ 5 = -5
eqno
eq $$
yields
7
x + 11
x2 = 50
3
x +
x3 = 85
4
x + 8
x7 = 12
7
x + 4
x2 = 0
x + 21
x5 = - 5
Since you are an astute reader you have no doubt noticed
that what I have told you to this point only solves half of the
problem.
While
eq automatically generates equation numbers
which, each time you run the paper through TEX ,
are automatically updated to conform to the order in which
they appear in the text, we have no a priori way of knowing what these
numbers are.
The question is, How do we get hold of these numbers so that
we can refer to them in the text?
Well,
eq provides a partial solution to this problem by
definiing the control sequence
? a synonym for that
number each time it is invoked.
Hence, typing
? at any point in the text causes TEX to
print the number of the last equation in which you used the
command
eq.
For example by typing equation
? we cause TEX to print
equation , which is the number of the last equation
appearing in our examples.
The only thing wrong with this solution is that the meaning of
the symbol
? changes each time you invoke
eq,
so what happens if you want to refer back to an equation
at several different points in the text?